import { observable, computed, action } from 'mobx';
import { Promise } from 'drunk-base';
import { getAccountList, deleteAccount, search } from './AccountHttpResource';
import { IAccountModel } from './AccountModel';
import { ListModel } from '../../ListModel';

export class AccountListModel extends ListModel<IAccountModel> {

    deleteItemImpl(id: string) {
        return deleteAccount(id);
    }

    fetchListImpl(page: number, size: number) {
        return getAccountList(page, size);
    }

    searchImpl(name: string, startTime: number, endTime: number, page: number, size: number) {
        return search(name, startTime, endTime, page, size);
    }
}